
<template>
  <div>
    <el-table :data="tableDataList" border style="width: 100%" @cell-click="tEdit" :height="400">
      <el-table-column align="center" prop="item" label="item款号"></el-table-column>
      <el-table-column align="center" prop="salesAmount" label="销售金额(万)" :formatter="stateFormat"></el-table-column>
      <!-- 注意：这里的 label 应该与您的实际需求相匹配，可能是“销售金额占比（占全品类）”或“销售金额占比（占top50）” -->
      <el-table-column :formatter="PerseFormat" align="center" prop="salesAmountRatio" label="销售金额占比"></el-table-column>
      <el-table-column align="center" prop="salesNumber" label="销售件数" :formatter="numberFormat"></el-table-column>
      <el-table-column :formatter="PerseFormat" align="center" prop="salesNumberRatio" label="销售件数占比"></el-table-column>
      <el-table-column align="center" prop="avgSalePrice" label="件均单价" :formatter="stateFormat"></el-table-column>
      <el-table-column :formatter="PerseFormat" align="center" prop="discountRate" label="折扣率"></el-table-column>
      <el-table-column :formatter="PerseFormat" align="center" prop="returnRate" label="退货率"></el-table-column>
      <!-- <el-table-column
        :formatter="PerseFormat"
        align="center"
        prop="sellOutRate"
        label="售罄率"
      ></el-table-column> -->
      <el-table-column align="center" prop="visitors" label="商品访客数" :formatter="numberFormat"></el-table-column>

      <el-table-column :formatter="PerseFormat" align="center" prop="visitorsRatio" label="访客数占总比"></el-table-column>
      <el-table-column :formatter="PerseFormat" align="center" prop="payConversionRate" label="支付转化率"></el-table-column>
    </el-table>
  </div>
</template>  
<script>
export default {
  props: {
    tableDataList: {
      type: Array,
      default: () => [],
    },
  },
  methods: {
    tEdit(row) {
      this.$emit("getsaleComprehensiveStatistics", row.item);
    },
  },
};
</script>